namespace Xsxiaosa.Net
{
    using System;
    using System.IO;
    using System.Net;

    public class FtpWebResponse : WebResponse
    {
        // Methods
        internal FtpWebResponse(Stream stream, Uri uri)
        {
            this._headers = new WebHeaderCollection();
            this._headers.Add("Content-type", "binary/octet-stream");
            this._uri = uri;
            this._stream = stream;
        }

        public override void Close()
        {
            this._stream.Close();
        }

        public override Stream GetResponseStream()
        {
            return this._stream;
        }


        // Properties
        public override long ContentLength
        {
            get
            {
                object[] objArray1 = new object[1];
                objArray1[0] = "ContentLength";
                throw new NotSupportedException(Xsxiaosa.Net.Messages.GetString(typeof(FtpStrings), "WebRequestNotSupported", objArray1));
            }
        }

        public override string ContentType
        {
            get
            {
                return "binary/octet-stream";
            }
        }

        public override WebHeaderCollection Headers
        {
            get
            {
                return this._headers;
            }
        }

        public override Uri ResponseUri
        {
            get
            {
                return this._uri;
            }
        }


        // Fields
        private const string _contentType = "binary/octet-stream";
        private WebHeaderCollection _headers;
        private Stream _stream;
        private Uri _uri;
    }}

